interface IObjectKeys {
    [key: string]: any
}

interface Request {
    code: number,
    data: IObjectKeys,
    msg: string,
}


/**************** card *****************/
// 菜名类型声明
enum Proficiency {
    hasNotStarted = 'hasNotStarted', // 未开始
    inProgress = 'inProgress', // 进行中
    perfect = 'perfect', // 已熟练
}
interface Cookbook {
    name: string;
    id: string;
    proficiency: 'hasNotStarted' | 'inProgress' | 'perfect'
}

/**************** Module *****************/
// 模块声明
interface Module {
    name: string;
    describe: string;
    cookbooks: Cookbook[];
}

/**************** Cuisine *****************/
// 料理信息
enum Difficulty {
    'easy' = '容易',
    'normal' = '正常',
    'difficult' = '困难'
}
enum Taste {
    'acid' = '酸',
    'sweet' = '甜',
    'bitter' = '苦',
    'spicy' = '辣'
}

interface RelatedInfo {
    difficulty: Difficulty,
    cookingTime: string,
    taste: Taste
}

interface Ingredient {
    name: string,
    dosage?: string
    important?: boolean
}

interface Cuisine {
    name: string;
    describe: string;
    relatedInfo: RelatedInfo;
    picture: string;
    ingredients?: Ingredient[]
    makes: IObjectKeys[],
    proficiency: Proficiency,
}

// 普通接口作为类型使用
export type {
    Module,
    Cookbook,
    Cuisine,
    RelatedInfo,
    IObjectKeys,
    Ingredient,
    Request
}

// enum做为变量使用
export {
    Difficulty,
    Taste,
    Proficiency
};